<%@page import="java.util.List,com.crm.beans.SupplyParts,java.util.List" %>
<%
List<SupplyParts> lsParts=(List<SupplyParts>)request.getAttribute("supplyParts"); 
%>
<script>

	$(function() {
		$( "#datepicker" ).datepicker({ dateFormat: "dd-mm-yy" },"option", "autoSize", true);
	});
</script>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
              <td align="right">Supply Order Number</td>
              <td align="right" valign="middle"><label></label>              <label>
                <input name="soNo" type="text" class="form" id="soNoId" />
              </label></td>
              <td align="right" valign="middle">Supplier Order Date</td>
              <td align="right" valign="middle">
                <div id="demo"><input name="soDate" type="text" class="form" id="datepicker" /></div>
                        </td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="left" valign="middle"></td>
              <td align="left" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td height="5" align="right"></td>
              <td height="5" align="right" valign="top"></td>
              <td height="5" align="left" valign="middle"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">Invoice Number</td>
              <td align="right" valign="middle"><input name="invoiceNum" type="text" class="form" id="invoiceNumId" /></td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="right" valign="middle">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
            </tr>
              <tr>
              <td height="5" align="right"></td>
              <td height="5" align="right" valign="top"></td>
              <td height="5" align="left" valign="middle"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
            </tr>
              <tr>
              <td height="5" align="right"></td>
              <td height="5" align="right" valign="top"></td>
              <td height="5" align="left" valign="middle"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
              <td height="5" align="left" valign="top"></td>
            </tr>
            </table>
       

        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
          <tr>
            <td width="36" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x">S.No </td>
            <td width="138" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Part Number</td>
            <td width="140" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Description</td>
            <td width="162" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Qty</td>
            <td width="186" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Unit Price</td>
            <td width="186" align="center" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Sub Total</td>
          </tr>
          <%
          for(int i=0;i<lsParts.size();i++){
          %>
          <tr>
            <td align="center" bgcolor="#FFFFFF"><input name="partid<%=i+1 %>" type="hidden" size="5" value="<%=lsParts.get(i).getPartId()%>"/><input name="sno<%=i+1 %>" type="text" size="5" value="<%=i+1 %>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="partNumber<%=i+1 %>" type="text" size="5" value="<%=lsParts.get(i).getPartNo() %>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="desc<%=i+1 %>" type="text" size="5" value="<%=lsParts.get(i).getDesc() %>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="qty<%=i+1 %>" type="text" size="5" value="<%=lsParts.get(i).getQty() %>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="unitPrice<%=i+1 %>" type="text" size="5" value="<%=lsParts.get(i).getUnitPrice() %>"/></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="subTot<%=i+1 %>" type="text" size="5" value="<%=lsParts.get(i).getTotalcost() %>"/></td>
          </tr>
          <% } %>
          <input type="hidden" name="rowCount" value="<%=lsParts.size() %>"/>
        </table>
   
       
	    <table width="80%">
	     <tr><td align="right"> &nbsp;</td></tr>
	    <tr><td align="right"> <input type="submit" class="button" id="" value="Save Invoice"/></td></tr></table>
	   
	   